Applying Filters to a Custom Report

Filters support is added for custom reports with section types - HTML Template, Tabular, and Loop. The filter mechanism is same as the existing view filters. See Filtering views for more information.

As a part of custom reports enhancement, filters are now available in Basic Filtering Section and Advanced Filtering Section.

Basic filtering section

When defining a view, you can add detailed filter criteria to narrow the result set. This filtering mechanism is the same that Platform uses for object-specific searches and for reports to determine which records are shown in the output.

The filter mechanism allows you to add filters by selecting a field, an operator, a value, and a date interval. See Filter criteria and Filtering by date intervals for more information.

You can add more filters by clicking the + button. By default, you can add only five filters. You can change this value by modifying the MaxFilters shared property. See Shared Properties for more information. Simillarly, you can remove filters using the - button. A valid filter entry will have field and operation auto-selected.

The Condition Expression value is auto-generated from valid filter entries. A valid filter entry must have a field and an operation selected.

You can modify the conditional expression value by selecting the Override Expression checkbox . If the checkbox is selected, the expression value doesn't get auto-generated even on modification of filters. Also, AND/OR toggle buttons are hidden.

Note: Each filter (except last one) will have AND or OR join type toggle buttons. So that you can specify join type condition per filter.

The below example shows how to filter and fetch all records that are having name as "Infinite Blue Hyderabad", created last week, or all records created by current user. You can modify conditional expression by adding parenthesis to run them in different ways.

Advanced filtering section

While filtering views based on expressions offers a lot of flexibility, it does not cover all possible filtering scenarios. For this reason, Platform offers filtering by a formula. To filter a view by a formula, click Switch to Advanced Filtering.

formula

The page displays the Formula Helper, where you can define the formula.

You must use an Object's field integration name while using a filed in a formula. The Formula Helper area can help you find the integration name. If you select the field from the Select Merge Token field, the subsequent field displays its integration name. Copy this name and use it in the formula. The following simple example of a filter formula, filters author names in a library application to only view titles with author name as Dan Brown:

A filter formula can include tokens derived from the current date as shown above. See Filtering by formula for more information..